<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>添加权限</title>
    <link rel="stylesheet" href="/static/lib/layuiadmin/plugins/layui/css/layui.css" media="all" />
    <link rel="stylesheet" href="/static/lib/layuiadmin/css/global.css" media="all">
    <link rel="stylesheet" href="/static/lib/layuiadmin/plugins/font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="/static/lib/layuiadmin/css/table.css" />
</head>

<body>
<div class="admin-main">

    <div style="margin: 15px;">
        <form class="layui-form" method="post" action="/admin/product_cat/update">
            <div class="layui-form-item">
                <label class="layui-form-label">类目名称</label>
                <div class="layui-input-block">
                    <input type="text" name="name" value="<{$productCat.name}>" required lay-verify="required" placeholder="请输入栏目名称" autocomplete="off" class="layui-input">
                </div>
            </div>


            <div class="layui-form-item">
                <label class="layui-form-label">父栏目</label>
                <div class="layui-input-block">
                    <select name="pid" lay-filter="role" disabled>
                        <option value="0"  <{if condition="($productCat.pid eq 0)"}>selected<{/if}>   >根类目</option>
                        <{volist name="tree" id="item"}>
                        <option value="<{$item.id}>"  <{if condition="($productCat.pid eq $item.id)"}>selected<{/if}>   ><{$item.name}></option>
                        <{if condition="(isset($item.sub))"}>
                        <{volist name="$item.sub" id="v"}>
                        <option value="<{$v.id}>" <{if condition="($productCat.pid eq $v.id)"}>selected<{/if}>  >|--<{$v.name}></option>
                        <{/volist}>
                        <{/if}>
                        <{/volist}>
                    </select>
                </div>
            </div>

            <input type="hidden" name="id" value="<{$productCat.id}>" />

            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button lay-filter="add" lay-submit class="layui-btn">提交</button><a href="/admin/product_cat/index" class="layui-btn layui-btn-danger">返回</a>
                </div>
            </div>

        </form>
    </div>

</div>
<script type="text/javascript" src="/static/lib/layuiadmin/plugins/layui/layui.js"></script>
<script type="text/javascript">
    layui.use('form', function(){
        var form = layui.form();
    });


</script>

</body>

</html>